﻿using System.ComponentModel.DataAnnotations.Schema;
using System.Reflection.Emit;

namespace ZhiJiao.Models.Entities
{
    /// <summary>
    /// 机构表
    /// </summary>
    [Table("Instructions")]
    public class Instruction : BaseEntity
    {
        /// <summary>
        /// 机构名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 所在地址
        /// </summary>
        public string Address { get; set; }

        /// <summary>
        /// 联系电话
        /// </summary>
        public string LinkPhone { get; set; }

        /// <summary>
        /// 机构拥有的测评列表
        /// </summary>
        public List<Evaluation> Evaluations { get; set;}

        /// <summary>
        /// 机构角色集合
        /// </summary>
        public List<Role>? Roles { get; set; }
        
        /// <summary>
        /// 负责人
        /// </summary>
        public User? ControlUser { get; set; }

        /// <summary>
        /// 活动状态
        /// </summary>
        public bool IsActive { get; set; }

        /// <summary>
        /// 课程集合
        /// </summary>
        public List<Course> Courses { get; set; }
    }
}
